import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:graduation_project/cartoon_module/cartoon_list_three.dart';

class more_recommend extends StatefulWidget {
  more_recommend({Key key, this.recommend_id}) : super(key: key);
  int recommend_id;
  @override
  State<more_recommend> createState() => _more_recommendState();
}

class _more_recommendState extends State<more_recommend> {
  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    // 通过已知的title_id知道类别和获取数据
  }

  List cartoon_list0 = [
    {
      "cartoon_id": 1,
      "cartoon_name": "间谍过家家",
      "cartoon_tage": 4,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
    {
      "cartoon_id": 2,
      "cartoon_name": "间谍过家家1",
      "cartoon_tage": 1,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
    {
      "cartoon_id": 3,
      "cartoon_name": "间谍过家家2",
      "cartoon_tage": 1,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
    {
      "cartoon_id": 4,
      "cartoon_name": "间谍过家家3",
      "cartoon_tage": 3,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
    {
      "cartoon_id": 5,
      "cartoon_name": "间谍过家家4",
      "cartoon_tage": 5,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
    {
      "cartoon_id": 6,
      "cartoon_name": "间谍过家家5",
      "cartoon_tage": 0,
      "cartoon_leader_image":
          "https://nianyiman-1309342317.cos-website.ap-guangzhou.myqcloud.com/jdgjj/jdgjj0.png"
    },
  ];
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: [
          Container(
            margin: EdgeInsets.only(top: 20, bottom: 10),
            child: Row(
              children: [
                Container(
                    margin: EdgeInsets.only(left: 10),
                    child: Text(
                      '更多推荐',
                      style: TextStyle(fontSize: 16),
                    )),
                Expanded(child: SizedBox()),
                InkWell(
                  onTap: () {
                    print('刷新');
                  },
                  child: Row(
                    children: [
                      Container(
                          width: 10,
                          margin: EdgeInsets.only(right: 4),
                          child: Image.asset(
                            'assets/images/common/cartoon/shuaxin.png',
                            color: Colors.black54,
                          )),
                      Container(
                          margin: EdgeInsets.only(right: 12),
                          child: Text(
                            '换一批',
                            style:
                                TextStyle(fontSize: 12, color: Colors.black54),
                          )),
                    ],
                  ),
                ),
              ],
            ),
          ),
          cartoon_list_three(
            cartoon_list: cartoon_list0,
          ),
        ],
      ),
    );
  }
}
